package harima.agameditor.main;

import java.awt.BorderLayout;
import java.awt.Dimension;

import harima.agameditor.common.ui.ButtonPanel;
import harima.agameditor.main.resources.ActionCommands;
import harima.agameditor.mapeditor.ui.complement.MapEditorView;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

public class AwesomeGameEditor_design extends JFrame{

	protected 	MapEditorView mapEditor;
	JButton newProjectButton;
	JButton loadProjectButton;
	
	public AwesomeGameEditor_design()
	{
		super(Resources.MainFrameTitle);
		mapEditor = new MapEditorView();

		JPanel projectControlsPanel = createPorjectControlsPanel();
		
		JTabbedPane tabbedPane = new JTabbedPane();
		tabbedPane.addTab(Resources.MapEditorTitle, mapEditor);
		
		setSize(new Dimension(800,600));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setLayout(new BorderLayout());
		
		getContentPane().add(tabbedPane, BorderLayout.CENTER);
		getContentPane().add(projectControlsPanel, BorderLayout.NORTH);
	}

	private JPanel createPorjectControlsPanel() {
		newProjectButton = new JButton(ActionCommands.NEW_PROJECT);
		loadProjectButton = new JButton(ActionCommands.LOAD_PROJECT);
		newProjectButton.setActionCommand(ActionCommands.NEW_PROJECT);
		loadProjectButton.setActionCommand(ActionCommands.LOAD_PROJECT);
		
		JPanel panel = new JPanel();
		panel.add(newProjectButton);
		panel.add(loadProjectButton);
		
		return panel;
	}
}
